import request from '@/utils/request'

/**
 * 登录
 */
export function login (parameter) {
  return request({
    url: `/iam/login/password`,
    method: 'post',
    data: parameter
  })
}

/**
 * 获取用户权限
 */
export function getUserPermission () {
  return request({
    url: `/iam/login/user/getUserPermission`,
    method: 'get',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

export function logout () {
  return request({
    url: `/iam/login/logout`,
    method: 'post',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}
export function sendSmsCode (parameter) {
  return request({
    url: `/iam/account/sms`,
    method: 'post',
    data: parameter
  })
}
